package Test;

import java.util.ArrayList;

import org.junit.Test;

import DBLayer.DBTrainer;
import ModelLayer.Trainer;

public class TestDBTrainer
{
	DBTrainer dbt = new DBTrainer();
	ArrayList<Trainer> tlist = dbt.getAllTrainers(false);

	@Test
	public void testGetAllTrainers() {
	    System.out.println("\nTrainer size : " + tlist.size() + "\n");
	    int id = 1;
		while(id <= tlist.size())
		{ /* PersonID, FirstName, LastName, Address, PostalCode, City, PhoneNr, MobileNr, Email, TrainerID, CPR, Initials, GrownupID */
			Trainer t = dbt.searchTrainerID(id, false);
			System.out.println("TrainerID    : " + t.getTrainerID());
			System.out.println("PersonID     : " + t.getPersonID());
			System.out.println("GrownupID    : " + t.getGrownupID());
			System.out.println("Navn         : " + t.getfName() + " " + t.getlName());
			System.out.println("Adresse      : " + t.getAddress());
			System.out.println("Adresse      : " + t.getPostalCode() + " " + t.getCity());
			System.out.println("Telefon      : " + t.getPhoneNr());
			System.out.println("Mobil        : " + t.getMobileNr());
			System.out.println("Email        : " + t.getEmail());
			System.out.println("CPR          : " + t.getCPR());
			System.out.println("Initials     : " + t.getInitials());
			System.out.println("------------------------------------");
			id++;
		}
	}

	@Test
	public void testSearchTrainerID() {
		
	}
/*
	@Test
	public void testInsertTrainer() {
		fail("Not yet implemented");
	}

	@Test
	public void testUpdateTrainer() {
		fail("Not yet implemented");
	}

	@Test
	public void testDelete() {
		fail("Not yet implemented");
	}

	@Test
	public void testGetAllTrainers() {
		fail("Not yet implemented");
	}
*/
}
